package org.carabiner.infinitest;

import java.io.File;

public class ClassUtils
{
  public static void touch(Class classToModify)
  {
    String classname = classToModify.getName(); 
    classname = classname.replace(".", "/");
    File file = new File(InfinitestSettings.getBuildPath() + "/" + classname + ".class");
    if (!file.exists())
      throw new IllegalArgumentException(file + " does not exist");
    if (!file.setLastModified(file.lastModified() + 1000))
      throw new IllegalStateException(file + " could not be touched!");
  }

}
